I'm trying to setup a docker based system with the least amount of network abstraction/virtualization possible. This is why I avoided k8s and am trying docker-swarm instead.
I'd like haproxy
to be started directly via systemd
and listen to external traffic on ports 80/443 directly, i.e. without docker coming into the picture. However, when proxying traffing to backend servers, I'd like it to connect to docker-swarm services running in dnsrr
mode.
How do I set this up? I've read this blog post multiple times, but in all three configurations it seems that haproxy
itself is running as a docker-swarm service. I do not want any network "abstraction" to come between haproxy and customer-facing traffic.
Is a setup like this possible?
PS: A related question might be, how do I communicate between the host and a docker-swarm container running on the same host? I tried pinging 10.0.6.75
(the container's IP address) on the same host on which it was running, but it didn't work. Do I need to create some network route, or make some entry in iptables to get this to work?